
#if Windows

#define _CRTDBG_MAP_ALLOC

#ifdef _DEBUG
	#include <stdlib.h>
	#include <crtdbg.h>

	#ifndef DEBUG_NEW
		#define DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
		#define new DEBUG_NEW
	#endif
#endif

#if Windows
#define START_MEMORY_DETECTOR _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF|_CRTDBG_LEAK_CHECK_DF);
#else
#define START_MEMORY_DETECTOR
#endif

#endif